var a = getApp();

Page({
    data: {
        activeName: "1",
        listData: [],
        page: 1,
        finished: !1,
        all: "",
        wait: "",
        already: ""
    },
    onLoad: function(a) {
        this.getData();
    },
    onReachBottom: function() {
        this.getData();
    },
    getData: function() {
        var t = this;
        if (!this.data.finished) {
            var e = a.getNetAddresss("plugin.stock-service.frontend.controllers.income.index");
            a._getNetWork({
                url: e,
                data: {
                    page: this.data.page
                },
                success: function(a) {
                    if (1 !== a.data.result) return wx.showToast({
                        title: a.data.msg
                    }), !1;
                    var e, i = a.data.data, s = !1;
                    t.setData({
                        all: i.all,
                        already: i.already,
                        wait: i.wait
                    }), (0 === i.list.data.length || i.list.data.length < i.list.per_page || i.list.current_page === i.list.last_page) && (s = !0), 
                    e = t.data.listData.concat(i.list.data), t.setData({
                        finished: s,
                        listData: e,
                        page: ++t.data.page
                    });
                }
            });
        }
    }
});